package net.godbirds.aps.wf;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import net.godbirds.boot.utils.DateUtil;
import net.godbirds.domain.mapper.TWfDefMapper;
import net.godbirds.domain.model.TWfDef;

@Service
public class WorkFlowService {
	private Date date = new Date();
	@Autowired
	TWfDefMapper tWfDefMapper;
	
	public int  add(TWfDef tWfDef){
		tWfDef.setCode("WF"+DateUtil.getCurrentDateAndTime());
		tWfDef.setInsertTime(date);
		tWfDef.setLastModifyTime(date);
		int i = tWfDefMapper.insert(tWfDef);
		return i;
	}
}
